﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductList.aspx.cs" Inherits="ZLCMS.Web.SystemManage.Basics.ProductSKU.ProductList" %>

<%@ Import Namespace="ZLCMS.Business.Util" %>
<%@ Import Namespace="ZLCMS.Commands.User.Util" %>
<%=_framePage.GetPagerFormHtml(Request.RawUrl)%>
<form id="pageForm" method="post" class="pageForm" runat="Server">
<%=_framePage.TabInfoHtml()%>
<div class="pageHeader">
    <div class="searchBar">
        <ul class="searchContent">
            <li><span>商品名称&nbsp;</span>
                <asp:textbox id="tb_search_name" runat="server" cond="name" ctltype="textbox"></asp:textbox>
                &nbsp;&nbsp; </li>
            <li><span>商品代码&nbsp;</span>
                <asp:textbox id="tb_search_productno" runat="server" cond="productno" ctltype="textbox"></asp:textbox>
                &nbsp;&nbsp; </li>
            <li><span>状态&nbsp;</span>
                <asp:dropdownlist runat="server" id="ddl_status" cond="status" ctltype="dropdownlist"
                    width="150px">
                </asp:dropdownlist>
            </li>
              <li><span>产品类型&nbsp;</span>
                <asp:dropdownlist runat="server" id="ddl_product_kind" cond="productkind" ctltype="dropdownlist"
                    width="150px">
                </asp:dropdownlist>
            </li>
        </ul>
        <div class="subBar">
            <ul>
                <li><a class="buttonActive" href="<%= Request.Path %>" onclick="ZLAN_DWZ_EX.query(this);"
                    target="navTab" rel="<%= _framePage.NavTabId %>" title="<%= _framePage.NavTabTitle %>">
                    <span>&nbsp;检&nbsp;索&nbsp;</span></a>&nbsp;&nbsp; </li>
            </ul>
        </div>
    </div>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
              <% if ( AuthUtil.CheckAuthorization("PRODUCT_MAN", "ADD"))
                 { %>
            <li><a class="add" href='/SystemManage/Basics/ProductCategory/SelectCategory.aspx' target="navTab" rel="addptmember" title="产品-增加"><span>添加</span></a></li>
            <%}if ( AuthUtil.CheckAuthorization("PRODUCT_MAN", "DELETE")){%>
            <li><a class="delete" href="/SystemManage/Basics/ProductSKU/ProductDelete.aspx?ajax=dels" target="selectedTodo" title="请确定要删除"><span>删除勾选</span></a></li>
       <%} %>
        </ul>
    </div>
    <div class="tableList" layouth="115">
        <table class="list" targettype="navTab" asc="asc" desc="desc">
            <thead>
                <tr>
                    <th width="22px">
                        <input type="checkbox" group="ids" class="checkboxCtrl" />
                    </th>
                    <th width="80px">
                        ID
                    </th>
                    <th width="80px">
                        缩略图
                    </th>
                    <th width="120px">
                        商品编码
                    </th>
                    <th width="120px">
                        内部编码
                    </th>
                    <th width="140px">
                        商品名称
                    </th>
                    <th width="100px">
                        所属分类
                    </th>
                       <th width="100px">
                        产品类型
                    </th>
                    <th width="100px">
                        库存
                    </th>
                    <%--<th width="120px">
                        SKU商品数量
                    </th>--%>
                    <th width="100px">
                        市场价
                    </th>
                    <th width="100px">
                        会员价
                    </th>
                    <th width="80px">
                        状态
                    </th>
                    <th width="120px" align=center>
                        操作
                    </th>
                </tr>
            </thead>
            <tbody>
                <asp:repeater runat="server" id="grid">
                <ItemTemplate>
			    <tr target="uid" rel='<%# Eval("Id")%>'>
                    <td><input name="ids" value="<%#Eval("Id")%>" type="checkbox"/></td>
				    <td><%# Eval("Id")%></td>
				    <td height="80px"><img src="<%# GetPicture( FileKit.FirstFilePath(Eval("ThumbnailImg").ToString())) %>" alt="" width="80px" /></td>
				    <td><%# Eval("ProductNo")%></td>
                    <td><%# Eval("InteriorCode")%></td>
				    <td><%# Eval("ProductName")%></td>
				    <td><%# ParamKit.GetValue("ProductType", Eval("TypeId").ToString(), "&nbsp")%></td>
                     <td><%# ParamKit.GetValue("ProductKind", Eval("Kind").ToString(), "&nbsp")%></td>
                    <td><%#Eval("Storage")%></td>
                    <%--<td><%#GetSkuProductCount(Eval("ProductNo"))%></td>--%>
				    <td><%# Eval("MarketPrice", "{0:0.00}") %></td>
				    <td><%# Eval("SalePrice", "{0:0.00}") %></td>
                    <td><%# (string)Eval("Status") == "1" ? "上架中" : "下架中"%></td>
				    <td  align="center"> 
                    <% if ( AuthUtil.CheckAuthorization("PRODUCT_MAN", "EDIT"))
                       { %>
				        <a href="/SystemManage/Basics/ProductSKU/ProductEdit.aspx?pid=<%# Eval("Id")%>" onclick="ZLAN_DWZ_EX.open(this);" target="navTab" title="产品-编辑" rel="editptmember">编辑</a>&nbsp;&nbsp;
                        <%}if (AuthUtil.CheckAuthorization("PRODUCT_MAN", "DELETE")) {%>
                        <a href="/SystemManage/Basics/ProductSKU/ProductDelete.aspx?ids=<%# Eval("Id")%>" target="ajaxTodo" title="请确定要删除">删除</a>&nbsp;&nbsp;
                        <%} %>
                         <%# ShowLink(string.Format("{0}",Eval("Id")), string.Format("{0}", Eval("Status")))%>&nbsp;&nbsp; 
				    </td>
			    </tr>
                </ItemTemplate>
            </asp:repeater>
            </tbody>
        </table>
    </div>
    <%= _framePage.GetPagerContentHtml()%>
</div>
</form>
